ZPatterns: Remapping object from on to another specialist
Now that the subject is on object remapping with Zpatterns. I'm not getting anywhere mapping between objects. I have a product folder EmployZ-Folder EmployZManager-Specialist WhoZ-Specialist Data Plug-ins myssMethod EmployZ-Zclass The EmployZManager just keeps a database of employee name, ID and salary. The WhoZ specialist keeps track of employee status like an in/out board. The Zclass for it is in another product. I'm trying to get the employee name from EmployZManagerto display in my WhoZ specialist. So I placed this skinscript in my WhoZ specialist data plugin tab. btw description and name is a WhoZ dataskin property myssMethod INITIALIZE OBJECT WITH original_object=EmployZManager.newItem(self.id) WITH EmployZManager.getItem(self.id) COMPUTE original_object=RESULT WITH self.original_object COMPUTE name=emp_id, description=first WHEN OBJECT ADDED,CHANGED STORE name, first USING self.original_object.manage_changeProperties( emp_id=self.name, first=self.description) WHEN OBJECT DELETED CALL self.original_object.manage_delete() Thanks -Jimbo
Hi Jimbo, I'm not sure what you mean by 'not getting anywhere...' but I've generally found it useful to work on problems like this one little step at a time. I might be tempted to just try: WITH EmployZManager.getItem(self.id) COMPUTE original_object = (RESULT is _.None) and NOT_FOUND or RESULT and WITH self.original_object COMPUTE name=emp_id, description=first and then put some objects into EmployZManager 'manually' with known attributes for emp_id and description. Then try to trigger the script by displaying the 'original_object' attribute. (You should set the rack to be non-persistent and 'original_object' as the existence attribute.) Once that's working, then worry about the other skinscript statements. If that's not working... the you have some other problem. -steve
participants (2)
-
jimbo -
Steve Spicklemire