Problem with "long name" and other script properti

*Using Version 10.2 (1763) on OSX*
Hi,

i want to read the "long name" property of the current script. with the following code:
put new "Global/Common/Config" into oConfig
put oConfig.init() into result
--Init function of the Config script
function Init

put me.long name --does not work
put oConfig.long name --does not work
put my long name --does not work
put Config.long name --does work

end function

in general: why is it not possible to access these properties when operating with the object? ->
put new "Global/Common/Config" into oConfig
put oConfig.long name --does not work

Comments

  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    When you create an object with code like this:
    put new "Global/Common/Config" into oConfig
    
    the object oConfig doesn't actually have a "name" (the object is stored in a variable whose name is 'oConfig' but that's not actually the name of the object. Similarly, it was created from the "Global/Common/Config" script object, which becomes its helper, but doesn't give it a name). So the long name property returns empty. You may want to use the long id property instead which should result in a unique identifier for every object.
  • ah i see. so i could take the first helper of my object to receive its script properties... better than nothing. thank you very much for your explanation!
Sign In or Register to comment.