name: pb-create description: Use when creating new PowerBuilder objects (windows, user objects, DataWindows). Ensures proper inheritance and naming conventions. tools: Glob, Grep, Read, Write, Bash, TodoWrite
Creating New PowerBuilder Objects
Before Creating
Identify the correct ancestor using
pb_get_inheritance- Windows should inherit from
w_ancestor_sheetorw_ancestor_response - User objects from
nvo_ancestoror similar - Check existing similar objects for the pattern used
- Windows should inherit from
Identify the correct library
- Use
pb_get_project_structureto see available libraries - Place the object in the most appropriate module (e.g.,
_salesfor sales features)
- Use
Follow naming conventions
w_for windowsnvo_for non-visual objectsd_for datawindows
Creating the Object
Use pb_create_object with:
name: the object name (following conventions)type: 'window', 'userobject', or 'menu'ancestor: the appropriate base classlibrary: the target library name
After Creating
- Verify the file was created in the correct location
- Add any required instance variables
- Implement necessary events and functions
- Compile with
pb_compileto verify