Anthrazit

750 Reputation

11 Badges

5 years, 290 days

MaplePrimes Activity


These are questions asked by Anthrazit

Is it possible to draw objects in Maple graphically, that are defined by parameters?

Like rectangles with width and height, circles with a radius, triangles, etc.

Is it possible to check, if a component - like a combobox - exists?

Is it possible to generate a XMLElement by using part of the code to be generated with a string, or are the only methods a strict use of AddAttribute and AddChild?

Hope the code below explains what I mean. The first line is a strict copy of a declaration in the help file.

The question is if I could use some part of the definition which is saved in the str variable and combine it into the first declaration?


 

with(XMLTools)

x := XMLElement("a", ["colour" = "red", "style" = "italic"], ["some content", XMLElement("b", ["colour" = "blue"], "more text"), "still more text"])

_XML_Element(_XML_ElementType("a"), [_XML_Attribute(_XML_AttrName("colour"), _XML_AttrValue("red")), _XML_Attribute(_XML_AttrName("style"), _XML_AttrValue("italic"))], [_XML_Text("some content"), _XML_Element(_XML_ElementType("b"), [_XML_Attribute(_XML_AttrName("colour"), _XML_AttrValue("blue"))], [_XML_Text("more text")]), _XML_Text("still more text")])

(1)

str := "["colour"="red","style"="italic"],["some content",XMLElement("b",["colour"="blue"],"more text"),"still more text"]"

"["colour"="red","style"="italic"],["some content",XMLElement("b",["colour"="blue"],"more text"),"still more text"]"

(2)

``


 

Download xml_string.mw

The member command allows testing, if a value is in a table.

But is it possible to check if the index is used, not the value?

L["hello"] := "funny"

"funny"

(1)

member("hello", L)

false

(2)

member("funny", L)

true

(3)

``

Download list.mw

I'd like to generate a string where the first part is changeable, and the second one needs to include apostrophs.

NODESteelProfiles_I:-Property("allmembers")

The section until til left bracket can be stored in one variable, but how can I add "allmembers") into the string?

First 12 13 14 15 16 17 18 Last Page 14 of 24