Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Save pointer class
Hello,
before you read my problem I must admid that a. this is my first post
on the forum, b. I've only been working with Clarion for about 3
months now and c. the company I'm working in (using Clarion), doesn't
do any Object Orientated Programming at all...
I thought it was time to change that, so I went over to create a
little class in Clarion 6.1ee.
At first it seem to work fine, helas, taking it to more tests makes it
fail...  And I'm looking for some help on why it fails.

About the class: the class is called the savePointerClass.  It has no
explicit constructor and no explicit destructor. It has no public
fields either.  Only two methods: savePointerClass.SetPtr and
savePointerClass.GetPtr.  Both as their only argument take a file.  In
the set method, the savepointerclass gets the name of the file, saves
the current pointer on the file and saves what's in the current record
buffer at the time.  The get method, checks to see if the same file
was given as an argument, and if so, restores the pointer and what was
in the records buffer.

Where it fails... For example: I got one tps file called buildings.
In an (imaginary) application, I got a table listing all the
buildings.  Some off these buildings are let's say appartments.
Appartments belong to a building.  So each building line in my table
is clickable, when you click it, an objBuilding (savePointerClass)
saves the info, and displays a the same form with the request to pick
a building from.  However, clicking a line in the new table will again
have an objBuilding save the info and showing a third form.  Closing
this form, back onto the second form.  Closing second form, back onto
the first form.  But now, the info that was in my original objBuilding
is lost, it was overwritten when I openened the form a third time!

Basically, opening the form in a new threat is not causing this
problem.  Does that mean to say that forms opened in a same threat
with fields (data) with the same name automatically share memory
adresses?  I don't understand why, the class isn't declared static at
all.

Any help, or hints and tips would be really appreciated!

Report this thread to moderator Post Follow-up to this message
Old Post
jantje69@hotmail.com
03-26-08 08:55 AM


Re: Save pointer class
Hi jantje69,

I am not sure what the answer to your question is.  It sounds to me like you
are hand coding this program.  Is that true???  I use 3rd party templates
for all of my added functionality and don't hand code anything except embed
code in templates.  Being able to do that is why I use Clarion.  <g>  I'm
sure you will get better and faster answers to your questions on the  ---
news.softvelocity.com  ---  newsgroup.
---
Best Regards,
Earl R Coker
ksasales AT machlink DOT com
www.kwiksystems.net
www.kwiksystems.com
www.kwiksystems.net/appshell/index.htm
www.kwiksystems.com/clarion.htm (BigTamer(tm) Templates)


<jantje69@hotmail.com> wrote in message
news:5dbeda8f-8456-4446-9a6c-101f812e3228@n75g2000hsh.googlegroups.com...
> Hello,
> before you read my problem I must admid that a. this is my first post
> on the forum, b. I've only been working with Clarion for about 3
> months now and c. the company I'm working in (using Clarion), doesn't
> do any Object Orientated Programming at all...
> I thought it was time to change that, so I went over to create a
> little class in Clarion 6.1ee.
> At first it seem to work fine, helas, taking it to more tests makes it
> fail...  And I'm looking for some help on why it fails.
>
> About the class: the class is called the savePointerClass.  It has no
> explicit constructor and no explicit destructor. It has no public
> fields either.  Only two methods: savePointerClass.SetPtr and
> savePointerClass.GetPtr.  Both as their only argument take a file.  In
> the set method, the savepointerclass gets the name of the file, saves
> the current pointer on the file and saves what's in the current record
> buffer at the time.  The get method, checks to see if the same file
> was given as an argument, and if so, restores the pointer and what was
> in the records buffer.
>
> Where it fails... For example: I got one tps file called buildings.
> In an (imaginary) application, I got a table listing all the
> buildings.  Some off these buildings are let's say appartments.
> Appartments belong to a building.  So each building line in my table
> is clickable, when you click it, an objBuilding (savePointerClass)
> saves the info, and displays a the same form with the request to pick
> a building from.  However, clicking a line in the new table will again
> have an objBuilding save the info and showing a third form.  Closing
> this form, back onto the second form.  Closing second form, back onto
> the first form.  But now, the info that was in my original objBuilding
> is lost, it was overwritten when I openened the form a third time!
>
> Basically, opening the form in a new threat is not causing this
> problem.  Does that mean to say that forms opened in a same threat
> with fields (data) with the same name automatically share memory
> adresses?  I don't understand why, the class isn't declared static at
> all.
>
> Any help, or hints and tips would be really appreciated!



Report this thread to moderator Post Follow-up to this message
Old Post
Earl R Coker
03-26-08 12:56 PM


Re: Save pointer class
Well basically the savepointerclass.SavePtr is called in the embed
"Before generated code" on a button, then savepointerclass.GetPtr is
called int he embed "After generated code".
Other then that, we're using (almost) no third party templates because
of compatibility, copyright, version, ... issues.
The news.softvelocity.com group requires password and login... Don't
have access at the moment... :(

Report this thread to moderator Post Follow-up to this message
Old Post
jantje69@hotmail.com
03-26-08 12:56 PM


Re: Save pointer class
O wait just figured out how to get to news.softvelocity.com... hehe
thx :-)

Report this thread to moderator Post Follow-up to this message
Old Post
jantje69@hotmail.com
03-26-08 12:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clarion archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:15 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.