userProperty mouseEvents

Workarounds and usability notes.

Re: userProperty mouseEvents

Postby Clifton » Wed Nov 01, 2017 8:36 am

IMPORTANT CONCEPTS TO REMEMBER WHEN NAMING OBJECTS:
Same story as "b". The "p#" values are reserved for page id's while "b#" are reserved for backgrounds. You should also avoid "o#" as these are object id's. Just put a dash or underscore in between the characters or extend the name with a prefix or suffix and you will always be fine.
  • Backgrounds use id's in the range of "b" followed by one or more digits.
    Example: b23 refers to background id 23. If any other object uses b23 as its name, there will be a referencing conflict. More than likely, any object with the name in the format of "b#" will cause the PowerPac referencing engine to resolve the name to the current background rather than some otherwise expected object.
     
  • Pages use id's in the range of "p" followed by one or more digits.
    Example: p105 refers to page id 105. If any other object uses p105 as its name, there will be a referencing conflict. More than likely, any object with the name in the format of "p#" will cause the PowerPac referencing engine to resolve the name to the current page rather than some otherwise expected object.
     
  • Objects use id's in the range of "o" followed by one or more digits.
    Generally avoid naming objects in the format "o#" unless the object thus named also shares the same id as its name.
     
  • Objects that must be referenced by the PowerPac must not share the same name unless the method used to reference them is in a group or search function where their unique ids will be returned instead of their names.
      Example:
      pgTBgetObjects( "page", /myb\d+/, false, false, true ); return value in [tmp]
      Comment: The var [tmp] now is an array where each index is a unique id
      of an object named in the format "myb#"
      Comment: Even if the page contained multiple objects named "myb1" their unique
      ToolBook id's would be returned by the search. (e.g.: tmp[1] = "p1.o16" would
      be an object on page id 1 with a id of "o16"). All PowerPac functions permit
      the use of unique ToolBook id's when referring to objects.
      Comment: You can loop the results in [tmp] using a for each loop in the Actions
      Editor and apply a set of functions to each object returned.
  • If two or more objects have the same name, then the first object found will be returned by the PowerPac referencing engine. This object generally is the one on the lowest layer of the parent element (whether page or background)
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: userProperty mouseEvents

Postby John Robin Dove » Wed Nov 01, 2017 9:06 am

Many thanks for the details. I don't have any p# or o# names. I still have the b# names which surprisingly work. I'll try to change them but because the tbk file is too big, I can't dump the book actions so I'll have to be very careful.
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am

Re: userProperty mouseEvents

Postby Clifton » Wed Nov 01, 2017 9:27 am

If they are not causing a problem, you should just be cautious moving forward. Conflicts are sure to happen if you name a ToolBook button object as "b#" because the PowerPac has to manipulate objects of this type at a level which interferes with background id's.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron