Well maybe i should describe what i want to do. I have a window entity. For it's functionality i use property classes such as tab and icon. Now, I could probably make the whole thing consist of separate entities, like one for window itself, one for each icon and one for each tab, but it's easier for me to manage it all with messages when i have just one entity. I can just do self.SubscribeMessage and self.SendMessage and the CEL's entrails do the rest, while i just care for the message itself to be correct. It just makes the whole window somewhat more coherent for me, even if it may not be the best design.
Anyway, while this design simplifies some things, there is a necessity for every billboard that is created by those property classes to have a tag - otherwise I would have many untagged billboards on one window entity what means they wouldn't work :P. However, because i need to have many icons and tabs on the window they also need to have tags. At the moment i can't get the tag so the only way to create billboards with tags is to have some 'name' property and create those billboards inside SetProperty (or some action for example). But since the name property and the python PC's tag are always the same, I wanted to simplify this by making the billboard with the pc's tag at the creation time of the property class itself. Peter 2008/7/15 Pablo Martin <[EMAIL PROTECTED]>: > Mmm, afaik both GetTag and SetTag should work. I tried, and they dont > seem to crash in any situation here. Problem seems to be the tag is set > after the entity, so you can only query it after SetEntity (which is > pretty awkward, maybe we should change it, although... the property > class should not care about its own tag either, afaik, so maybe there is > a better way to do what you want). > > Pablo > > Piotr Podgórski escribió: >> Update: It crashes when i try to print it from SetEntity(). From >> __init__() or anywhere else it doesn't crash but still prints None. >> >> 2008/7/15 Piotr Podgórski <[EMAIL PROTECTED]>: >> >>> Well i would probably be crazy if i wanted to SET but i want to GET >>> ;). And for that I've tried self.GetTag() but it didn't work. Trying >>> to print it crashes my propclass, while saying None anyway... >>> >>> 2008/7/15 Amir Taaki <[EMAIL PROTECTED]>: >>> >>>> Not sure why you'd want to do this... crazy! >>>> >>>> But you can do >>>> >>>> csRef<iCelPropertyClass> pcthis = scfQueryInterface<iCelPropertyClass> >>>> (this); >>>> pcthis->SetTag (blaa); >>>> >>>> So in python self.SetTag(blaa) should do. >>>> >>>> On Tue, Jul 15, 2008 at 6:59 PM, Piotr Podgórski <[EMAIL PROTECTED]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> A short question: How can i get a tag assigned to my Python Property >>>>> Class from the inside of that Property Class? >>>>> >>>>> Don't know if that matters but i use CEL 1.4 and set the tag in XML >>>>> map file using <propclass name="mypc" tag="mytag"/>. Also, i'd like to >>>>> be able to get that tag from the inside of the PC's __init__() or >>>>> SetEntity() functions. >>>>> >>>>> Thanx in advance, >>>>> >>>>> Peter "Coppertop" Podgorski >>>>> >>>>> ------------------------------------------------------------------------- >>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>>> challenge >>>>> Build the coolest Linux based applications with Moblin SDK & win great >>>>> prizes >>>>> Grand prize is a trip for two to an Open Source event anywhere in the >>>>> world >>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>> _______________________________________________ >>>>> Cel-main mailing list >>>>> Cel-main@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/cel-main >>>>> >>>> ------------------------------------------------------------------------- >>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>> challenge >>>> Build the coolest Linux based applications with Moblin SDK & win great >>>> prizes >>>> Grand prize is a trip for two to an Open Source event anywhere in the world >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>> _______________________________________________ >>>> Cel-main mailing list >>>> Cel-main@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/cel-main >>>> >>>> >>>> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Cel-main mailing list >> Cel-main@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/cel-main >> >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Cel-main mailing list > Cel-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cel-main > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Cel-main mailing list Cel-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cel-main