[wingide-users] Fwd: Alternative ways of generating links to object definitions, (resend without pgp messing up).

Gadget/Steve GadgetSteve at hotmail.com
Wed Aug 29 00:45:32 MDT 2012

I have the following scenario that I could use some help with:

A large number of message structures are defined in a messages package
within my application, including a MsgNoBody for message types that
consist of just a header, with a fixed file naming convention,
(Msg/MessageName/.py).  There is a single python file called
OnOfEachMsg.py that creates one instance of each message, (called each
called Cmd/MessageName/), including the messages that do not have a
body, these are created from a list of tupples like the following:
(/"MessageName", MsgFamily, MsgId/, True), # Message that has a body
defining file
(/"AnotherMessageName", AnotherFamily, AnotherId, /False), # Message
with no body

These values are then used during the loading of OneOfEachMsg to
generate and import the appropriate file, if any, and create one message
object of the correct type, family, id, name and add it to a dictionary
that is used for the decoding received messages, etc., in my
application.  Some other parts of the application only act on one or two
message types and they will use something like *from OneOfEachMsg import
CmdMessageName* so as only to have the specific message type in scope.

Elsewhere in the code I have also used some similar methods to cope with
large numbers of imports.

While this is great for code size, maintainability, etc., it does have
the slight problem that if defeats the WingIDE code parsing so I can not
use Goto Definition.

My question is, (at last you say), is there a way that I can generate a
file that will allow WingIDE to know where the definitions are to be found?

/(Hopefully actually without PGP removing the formatting this time)/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/wingide-users/attachments/20120829/be0b2e1c/attachment.html>

More information about the wingide-users mailing list