It is currently Sat Jan 16, 2021 8:55 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Does someone has experience with the NSUndoManager ?
PostPosted: Sat Nov 30, 2019 2:46 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 524
Does someone has an example to work with the OSX internal Undo function?
Lets say I have an array with four values. How can I undo/redo the data of these array?


Top
 Profile  
Reply with quote  
 Post subject: Re: Does someone has experience with the NSUndoManager ?
PostPosted: Sat Nov 30, 2019 3:10 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3710
Location: Netherlands
Wolfram wrote:
Does someone has an example to work with the OSX internal Undo function?
Lets say I have an array with four values. How can I undo/redo the data of these array?

Do you mean a normal array or a NSArray ?
I believe this undo function only works with objects and not with a PureBasic array.

_________________
macOS 10.15 Catalina, Windows 10


Top
 Profile  
Reply with quote  
 Post subject: Re: Does someone has experience with the NSUndoManager ?
PostPosted: Sat Nov 30, 2019 4:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 524
wilbert wrote:
Do you mean a normal array or a NSArray ?
I believe this undo function only works with objects and not with a PureBasic array.


Hi Wilbert,
well for the beginning an an NSArray is ok.
Maybe we could use an pb pointer to read the NSArray more easy inside of pb?
*myNSArray[1]\value


Top
 Profile  
Reply with quote  
 Post subject: Re: Does someone has experience with the NSUndoManager ?
PostPosted: Sun Dec 01, 2019 5:43 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 594
I know this isn't what you're asking, but if you don't want to mess with OS specific stuff and want a cross-platform system, srod's Demento is really good.

Forum topic: https://www.purebasic.fr/english/viewtopic.php?f=12&t=42867
Download: http://backup.rsbasic.de/?file=Demento.zip


Top
 Profile  
Reply with quote  
 Post subject: Re: Does someone has experience with the NSUndoManager ?
PostPosted: Sun Dec 01, 2019 7:06 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3710
Location: Netherlands
Wolfram wrote:
well for the beginning an an NSArray is ok.
Maybe we could use an pb pointer to read the NSArray more easy inside of pb?
*myNSArray[1]\value

I looked at it but find it hard to understand how to use it. :(
You have to provide specific methods so the undo manager knows how to redo something.

_________________
macOS 10.15 Catalina, Windows 10


Top
 Profile  
Reply with quote  
 Post subject: Re: Does someone has experience with the NSUndoManager ?
PostPosted: Sun Dec 01, 2019 5:25 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 524
wilbert wrote:
I looked at it but find it hard to understand how to use it. :(

Ok, if YOU say it is hard to understand it is no shame for me to give up. ;-)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye