Hi,
On Wed, May 5, 2010 at 7:25 PM, Damion Mitchell dammitchy@gmail.com wrote:
I am a newbie to Magma, and I am working on a project and I was wondering if there is an easy way to configure my system to have Magma work on seasidehosting. Now it is presently working on my local machine connect session := (MagmaSession openLocal: 'PackageDB') newSession; connectAs: 'admin'.
You can connect to a Magma using a "local" connection as you have already, or via a server listening on a port. See the wiki documentation for an explaination of this.
I would appreciate if some assistance could be given in this regard. Now I have implemented somewhat of a Singleton pattern, where I am allowing one DBase Connection per user session.
I presume, by this, you mean, one MagmaSession for each Seaside session. Really, it is much easier to help if you will employ language consistent with Magma. "one DBase Connection per user session" requires quite a bit of effort for me to try to "guess" what you mean, since there is no "DBase" anywhere, and "user session" is ambiguous..
Now I am having two issues.
- How can I explicitly save the changes made to actual MagmaDB. As I can
store data, to the object while in memory, but if I close the image all those changes are lost. So how can I ensure that it is also stored in the localfile.
By "close the image" I presume you mean, exiting the image without saving? The image is the object memory, so if you save and exit the image, all object state are saved in the image file.
If you want to commit the object state to the Magma repository, send #commit to your MagmaSession.
- I have an #unregistered method, however sometimes it works fine and
another time is complains that is doesNotUnderstand disconnect. Any hint or solution as to why this might be happening initialize super initialize. self database: PTDatabase new. unregistered self database session disconnect. super unregistered.
No idea. It sounds like probably your "database" doesn't have a #session, and therefore your applicatoin is trying to send #disconnect to the nil (an UndefinedObject).
- Chris