Jump to content



Photo
- - - - -

Destroy() Function In Classpad Sdk


  • Please log in to reply
1 reply to this topic

#1 dark_soul

dark_soul

    Newbie

  • Members
  • Pip
  • 2 posts

  • Calculators:
    ClassPad 330

Posted 17 October 2010 - 02:19 AM

Greetings, I am developing an application in which I want to have a menu of options that would be my main screen when I type an option, the screen need be delete and draw the appropriate screen, for it was planning to use the function Destroy (), to destroy the objects had already created, just not how to implement this function, I hope you can help me.

For all thank you.

Hector

#2 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 31 October 2010 - 09:27 AM

Hi. It's always best to include a copy of the source code of what you are working on.
Your post is a bit unclear to me. What is difficult about Destroy? For example in your CPModule window if you write Destroy(someButton) then it will remove that button.
But as of your case, you don't need to remove objects from a window then add new objects to that same window. ClassPad can have multiple windows in one CPMainFrame. I mean, put your menu of options in a CPModuleWindow (MainScreen), and put each one of other screens in their own CPModuleWindow. (AppropriateScreen1, AppropriateScreen2 etc) When user clicks an option set the appropriate scrren as the main window of your CPMainFrame:
case SIGNAL(option1, PSF_CLICKED):
	GetMainFrame()->SetTopWindow(AppropriateWindow1);
	GetMainFrame()->SetMainWindow(AppropriateWindow1);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users