Re: NSView's in Separate NIB

2015-09-04 Thread Marek Hrušovský
Please consider reading this (I don't code in swift/iOS but thats not and excuse): https://github.com/codepath/ios_guides/wiki/Custom-Views#how-views-are-defined-and-instantiated On Fri, Sep 4, 2015 at 7:58 PM, Dave wrote: > > > On 4 Sep 2015, at 18:40, Conrad Shultz wrote: > > > > > >> On S

Re: NSView's in Separate NIB

2015-09-04 Thread Marek Hrušovský
the Best > Dave > > > > On 4 Sep 2015, at 19:13, Marek Hrušovský wrote: > > > > Please consider reading this (I don't code in swift/iOS but thats not > and excuse): > > > > > https://github.com/codepath/ios_guides/wiki/Custom-Views#how-vie

Re: Identifying a specific Mac model

2015-09-14 Thread Marek Hrušovský
NSPipe *outputPipe = [NSPipe pipe];NSTask *task = [[NSTask alloc] init];[task setLaunchPath:@"/usr/sbin/system_profiler"];[task setArguments:@[@"SPHardwareDataType"]];[task setStandardOutput:outputPipe];[task launch];[task waitUntilExit];NSData *outputData = [[outputPipe fileHandleForReading] readD

Re: Identifying a specific Mac model

2015-09-14 Thread Marek Hrušovský
p 14, 2015 at 11:17 AM, Marek Hrušovský wrote: > NSPipe *outputPipe = [NSPipe pipe];NSTask *task = [[NSTask alloc] init];[task > setLaunchPath:@"/usr/sbin/system_profiler"];[task > setArguments:@[@"SPHardwareDataType"]];[task > setStandardOutput:outputPipe]

Re: Identifying a specific Mac model

2015-09-14 Thread Marek Hrušovský
Those new images are simply not where they should be: " /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/" I think your only way is to grab serial code and scrape the image that is displayed here: https://selfsolve.apple.com/agreementWarrantyDynamic.do e.g. It shows color of my i

Re: Identifying a specific Mac model

2015-09-15 Thread Marek Hrušovský
I am just curious, is there a gold icon in the system or it's a guess that there should be one ? On Tue, Sep 15, 2015 at 3:59 PM, John Daniel < etresoft.apple.li...@icloud.com> wrote: > Thanks! That did the trick. It took a couple of tries to get it working. I > forgot that the namedImage method

Re: Identifying a specific Mac model

2015-09-15 Thread Marek Hrušovský
gt; John Daniel > > > On Sep 15, 2015, at 2:54 PM, Marek Hrušovský wrote: > > > > I am just curious, is there a gold icon in the system or it's a guess > that there should be one ? > > > > > ___ > > Cocoa

Re: Identifying a specific Mac model

2015-09-16 Thread Marek Hrušovský
bundle if I was > running it on a new MacBook. It does seem to work, but my confidence is > based more on faith than works. > > John Daniel > i...@etresoft.com > > > > > On Sep 15, 2015, at 4:16 PM, Marek Hrušovský wrote: > > > > Can you please tell us th

Re: Saving window and view state with NSDocument

2015-09-21 Thread Marek Hrušovský
I am far from architect but each window has an option "initWithCoder" and within XIB you can specify option "prefer coder instantiation". The information you want to store is not related to the model object (within document) cannot be reused. So basically I would implement NSCoder methods encode/in

Re: Saving window and view state with NSDocument

2015-09-21 Thread Marek Hrušovský
trollers? Would > that work? (I have started to try exactly that, but I have not yet > succeeded with making it work. It somehow seems a bold thing to do.) > > Kurt > > > > On 21 Sep 2015, at 20:22, Marek Hrušovský wrote: > > I am far from architect but each window has

Re: Saving window and view state with NSDocument

2015-09-22 Thread Marek Hrušovský
; restore that document — would it? > > On 21 Sep 2015, at 23:52, Marek Hrušovský wrote: > > Personally I would do it like this: > 1. Figure out what values you need to store > 2. Create custom object called configuration; for each window one kind > 3. Make it conform nscoding a

Re: Saving window and view state with NSDocument

2015-09-22 Thread Marek Hrušovský
This is somewhat true. I've just tested it with "NSQuitAlwaysKeepsWindows" and the restore delegate is kicked when you quit app/launch app from the dock. However, it's not called when you perform close on window (hit the red cross). On Tue, Sep 22, 2015 at 10:56 AM, Mike Abdullah wrote: > > > O

Re: questions on WebView for Mac apps

2015-10-01 Thread Marek Hrušovský
The only thing you have to do is to call a method and add it as subview in your code - (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration NS_DESIGNATED_INITIALIZER; It's max 3 minutes of work. On Thu, Oct 1, 2015 at 3:00 AM, Alex Hall wrote: > > > O

Re: App Transport Security has blocked a cleartext HTTP for a local IP

2015-10-15 Thread Marek Hrušovský
I read on some blogposts that ios9 GM did not support IP addresses for ATS. Do not know if this has changed. On Thu, Oct 15, 2015 at 9:06 PM, Devarshi Kulshreshtha < devarshi.bluec...@gmail.com> wrote: > Our webservices are hosted in some local IP, to bypass the App Transport > Security I added t

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-10-19 Thread Marek Hrušovský
I just went through my crashes and this thread popped up in google. I have additional information (one helpful method in the stack). Even if I dig deep I still can't figure out what can cause the issue. Is anyone able to get from "_hierarchyDidChangeInView" the line where it crashes? Anyway I cr

Re: [OT] Recent News Story Related to App Store Refunds

2016-06-11 Thread Marek Hrušovský
http://mjtsai.com/blog/2016/04/30/app-store-educational-discount/ On Sat, Jun 11, 2016 at 1:25 PM, Charles Jenkins wrote: > This is off topic, but I don’t know where else to ask this question of iOS > Developers. > > There was a recent news story about a developer being charged back because > Ap

Re: Binding to selection of NSArrayController

2015-02-03 Thread Marek Hrušovský
This sounds like that selection from nstableview is not properly linked. Make sure that selectionIndex (or something similar) from table is linked to arraycontroller On Tue, Sep 23, 2014 at 6:15 PM, Jonathan Taylor < jonathan.tay...@glasgow.ac.uk> wrote: > Hi all, > > I feel this should be a very

Re: Revert almost working

2015-02-03 Thread Marek Hrušovský
Reverting means that new model is loaded into ORIGINAL window (windowDidLoad / awakeFromNib aren't going to be called because the window already exists). Make sure you hook your delegates in readFromData:ofType:error: or revertToContentsOfURL:ofType:error: Mind that your IBOutlets might not exists

Re: Weird crashes on Yosemite

2015-03-13 Thread Marek Hrušovský
I do not have a solution but hopefully i can point you to right direction: It crashes when the window is trying to become key window. "becomeKeyWindow " [NSWindow becomeKeyWindow]. It crashes in _dataSourceValueForColumn:row: It crashes on selector objectAtIndex: According to dissasembly column is

Re: NSAppleScript Problem

2015-03-26 Thread Marek Hrušovský
Have you tried executing the script? // Execute the script, compiling it first if it is not already compiled. Return the result of executing the script, or nil and a pointer to an error information dictionary for failure. - (NSAppleEventDescriptor *)executeAndReturnError:(NSDictionary **)errorInf

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Marek Hrušovský
AddAssetAccessoryView -> I think it should be named as a controller. You kick off view loading and the view is being retained by nsopenpanel. However, I can't see that you retain the NIB you load. Marek. On Mon, Mar 30, 2015 at 8:09 PM, Mike Abdullah wrote: > > > On 30 Mar 2015, at 08:19, Steve

Re: Custom NSView subclass - expressing the fact that a property affects the displayed image

2015-05-23 Thread Marek Hrušovský
Haven't read all the thread but i would use a custom property with overridden setter to call setNeedsDisplay with combination of keyPathsForValuesAffectingValueForKey: I think you can get rid of the glue code. On Sat, May 23, 2015 at 3:42 PM, Jonathan Taylor < jonathan.tay...@glasgow.ac.uk> wrote

Re: NSTableView drag image - using the first column image

2017-12-18 Thread Marek Hrušovský
Override: - (NSArray *)draggingImageComponents; Apple uses it in its sample TableViewPlaygroud. I found it using br -n "-[NSDraggingImageComponent initWithKey:]". lldb and breakpoints can help you. Use hopper or class-dump to see method names (AppKit). Marek. On Fri, Dec 15, 2017 at 6:52 PM,