FillPortsMenu



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/06/2008 at 05:01, xxxxxxxx wrote:

    Hi Shawni,

    That's beautiful, it works, thanks a lot really.
    There are some minor changes which I snippet here.
    watch out: this message editor does not seem to know the plus sign, so i replaced it with "plussign"
    I don't know how to change this behaviour.

    Regards,
    Jan

    > \> //{-------------------------------------------------} \> virtual Bool Message(GeListNode \*node, LONG type, void \*data) \> { \> BaseContainer\* bc = (BaseContainer\* ) data; \> GvNode\* mynode = (GvNode\* ) node; \> String S = ""; \>       \> switch (type) //When a port was added \> { \>      case GV_MESSAGE_PORT_ADDED: \>      { \>          switch (bc->GetLong(GV_MESSAGE_FIRST_DATA_ID"plussign"0,0)) \>          { \>            case GV_PORT_OUTPUT: \>            {    \>                      GvPort\* addedOutPort = mynode->GetOutPort(mynode->GetOutPortCount()-1); \> \>                      // get the port id, stored in the data (bc) \>                      // at GV_MESSAGE_FIRST_DATA_ID"plussign"1 \>                      //(see GvMessage in the sdk) \>                      // get the port id \>                      long id = bc->GetLong(GV_MESSAGE_FIRST_DATA_ID"plussign"1); \> \>                      // method to get the old name \>                      S = addedOutPort->GetName((GvNode\* )node) "plussign" LongToString(id); \> \>                      // method to set the new name \>                      addedOutPort->SetName(S); \>      } \> etc, etc \>



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/06/2008 at 06:32, xxxxxxxx wrote:

    Hi!

    correct me if i am wrong...

    base->GetLong(<GV_MESSAGE_FIRST_DATA_ID+0>, 0))

    The part in the angle brackets is a constant....



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/06/2008 at 08:50, xxxxxxxx wrote:

    Yes sure you are right..what's wrong ?
    Jan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/06/2008 at 14:36, xxxxxxxx wrote:

    What happens?

    When I take your code and change "plussign" to + it works...



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/06/2008 at 06:47, xxxxxxxx wrote:

    Yes, it may sound ridiculous but you see, in this forum editor i cannot type the "plus".
    If i do, it disappears from the text in the "Post Preview" like magic, thats why i replaced it with the "plussign", exactly as you said in your last mail.

    This may be somewhat confusing but the code works fine indeed. The node is ready.

    Thanks again.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 18/06/2008 at 11:43, xxxxxxxx wrote:

    Hi,

    Well, my node isn't quite ready...
    Now that i have added a port, how can a user remove it if he/she wants to?
    Clicking on it with the right mouse shows a disabled 'Delete Port' in the popup.
    Ok this should be done with GetDEnabling yes?
    But a GePrint shows that this function is not called at the right time.
    And if it was, how would i find the id of the 'Delete Port'. Adding a 'Delete Port' in the 'FillPortMenu' adds just another 'Delete Port'.

    Jan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/06/2008 at 23:49, xxxxxxxx wrote:

    Hi!

    I am back :)

    Change the settings in your res file.

    CONTAINER PythonNode
    {
         NAME JanaNode;
         INCLUDE GVbase;

    GROUP ID_GVPORTS
         {
              LONG in_long {INPORT;}

    .....
    Add CREATEPORT, MULTIPLE, etc...depends on what you need.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/06/2008 at 04:33, xxxxxxxx wrote:

    Mmmm, you're an expert Shawni. Respect.

    I had defined my ports as {INPORT; STATICPORT;}

    Thanks a million.

    Regards,
    Jan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/06/2008 at 05:38, xxxxxxxx wrote:

    Hi!

    nice to see that it works.

    In your case: Do you mix "Createport" and "Multiple"?

    bye



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/06/2008 at 09:18, xxxxxxxx wrote:

    Well, eeeeh, i use neither...
    You mean in the iCreate or in the res file or something?
    I Just create a node from scratch. And it works.

    Hey, do yo know a way to find out when an object from the Object manager is dropped into the XPresso Editor, and when   a connection is made (wire)?

    I need to trace the connection from my node all the way to a (direct or indirect) connected object(s).

    Jan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/06/2008 at 11:09, xxxxxxxx wrote:

    hi!

    Create an object input-port. Use "GVGENERALOBJECT" in your res file.

    In the calculate file, get the BaseLink2D from the port and cast it to an BaseObject.

    bye



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/06/2008 at 13:27, xxxxxxxx wrote:

    hi Shawni,

    You mention a 'BaseLink2D' but you mean a 'BaseList2D'?
    I know, but that delivers only a directly connected node. Of course you could follow the chain forward to an object, but i think i prefer a message when an object from the manager is dropped. Something like a DRAG_RECEIVE, but then for the XPresso editor.
    What i need is to get a pointer to the object that is the final target of my node, although several nodes might or might not be in between me and my target.
    Jan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/06/2008 at 02:04, xxxxxxxx wrote:

    Hi!

    I'm sorry. I ment a BaseLink, not a BaseLink2D.

    You could listen for CoreMessage(). Perhaps you receive your Drag_Receive.
    Print out the id and check the constant.

    bye.

    p.s. if you have information about getting objects, please let me know.


Log in to reply