| | | | Browse by category |
Article ID: 1114
Last updated: 29 Jan, 2008
Problem
Code that compiles with View.h++ 1.2.4 won't compile with View.h++ 1.3.0.
Cause
There were some major changes made between View.h++ v.1.2.4 and View.h++ v1.3.0. Here's some information on these changes that you'll need to compile your application:
Action
Code that compiles with View.h++ 1.2.4 won't compile with View.h++ 1.3.0.
Cause
There were some major changes made between View.h++ v.1.2.4 and View.h++ v1.3.0. Here's some information on these changes that you'll need to compile your application:
Made all resources bufferable for both setting and getting. This was a major rework of RWController and RWResourceObj internals and unfornately some protected API changes.
The changes to API involved replacing the RWController members sdargs (and associated sargscnt) with two RWResourceObj instances called setBuffer and getBuffer. This was necessary in order to provide the hooks for the resource buffering activities.
Note to RWController Derived Class Writers:
These changes cause compile time errors for derived classes that refer to these protected data members. This change is not source compatable with wrapped widget classes that used sdargs as documented in the User's Guide.
Action
Widget Writer's Workarounds
You can either update your derived classes to use the new interfaces or apply some backwards compatability changes to the View header files.To Change Your Source:
All occurrences of the data members need to be replaced by calls to the 1.3 accessor functions.substitute &sdargs with setBuffer.getArgs() substitute sargcnt with setBuffer.getArgCnt() substitute &gdargs with getBuffer.getArgs() substitute gargcnt with getBuffer.getArgCnt()
To Change the Library Headers:
Apply these context diffs to rw/Xrw/Control.h and rw/Xrw/ResObj.h using a tool like patch. The diffs are made relative to the top of your source tree.*** /tmp/T0a000Bb Mon Mar 4 10:58:04 1996 --- rw/Xrw/ResObj.h Mon Mar 4 10:57:44 1996 *************** *** 58,63 **** --- 58,71 ---- RWResourceObj( const RWResourceObj& ); ~RWResourceObj(); + #ifndef NO_124_BC + // provide backward compatability defines (see viewread.doc) + + RWDynamicArgArray& BCargs() { return dargs;} + int BCargCnt() { return argcnt;} + + #endif /* NO_124_BC */ + Arg * getArgs () const { return &dargs; } int getArgCnt () const { return argcnt; } void merge(const RWResourceObj & ro); *** /tmp/T0a000Be Mon Mar 4 10:58:13 1996 --- rw/Xrw/Control.h Mon Mar 4 10:57:47 1996 *************** *** 978,983 **** --- 978,994 ---- Widget getWidget () const { return (widget); } + + #ifndef NO_124_BC + // provide backward compatability defines (see viewread.doc) + + #define sdargs setBuffer.BCargs() + #define sargcnt setBuffer.BCargCnt() + #define gdargs getBuffer.BCargs() + #define gargcnt getBuffer.BCargCnt() + + #endif /* NO_124_BC */ + void setBufferResources(Boolean buffval) {bufferResources = buffval;}
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 1114
Last updated: 29 Jan, 2008
Revision: 1
Views: 5346
Posted: 15 Oct, 1997 by
--
Updated: 29 Jan, 2008 by
Others in this category
Powered by KBPublisher (Knowledge base software)