Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Is there any preference to doing:
code:
@synthesize foo, bar, buzz;
as opposed to:
code:
@synthesize foo;
@synthesize bar;
@synthesize buzz;
?

Adbot
ADBOT LOVES YOU

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Almost a year ago I setup two provisioning profiles for a simple game I was making. I made a second one because I scrapped the UIKit-based code for an OpenGL setup.

Anyway, I finally pulled my iPod Touch out and wanted to work through this Cocos2D book. I want to use it to test programs out, because touch input sucks on the simulator and stuff like the accelerometer doesn't work.

Do I have to either A) use the same code+profile for each chapter of the book B) make a new provisioning profile for each chapter? Can't I just use my device to test any random program I write?

Do I want to make a wildcard id?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Doc Block posted:

Just make one provisioning profile for everything. Just follow Apple's own HOWTO on the provisioning portal.

That ended up working, but I spent about two hours mucking around with old certificates and provisioning profiles and keychains.

Now I just need to figure out how to run stuff on an iPod 2G - I've changed the settings to armv6 like the google searches say, but it just says 'finished running testapp on Bob's iPod' and never actually runs. Runs fine on my iPad and iPhone 4

Maybe I'll just sell it and buy a new iPod.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Why is it so insanely complicated to just make a loving 'Hello World' view that has a UIButton that simply shows another view? Of course, if you choose a tabbed project you have that functionality out of the box, but that's not the point.

This poo poo is a CHAPTER in a book.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Doc Block posted:

Assuming you're using a navigation controller, it's not that complicated:

code:
- (IBAction)buttonWasTapped:(id)sender
{
    SomeViewController *controller = [[SomeViewController alloc] init];
    [self.navigationController pushViewController:controller animated:YES];
    [controller release];    // Leave out if you're using ARC
}

Yea I figured it out this morning in five minutes, I just needed a break and I need to get a Xcode 4 book.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I'm trying to do little iPhone app where you enter a set of 3 (x,y) coordinates, and then you touch the 'draw' button and it creates a new view and draws it on the screen. Easy enough, right?

I created a Single-view Applications using Xcode. So it gave me an AppDelegate, ViewController, and Xib file. I put the text fields and buttons and then when you click the button, it loads another Xib file and controller:
code:
    canvasViewController = [[CanvasViewController alloc] initWithNibName:@"CanvasViewController" bundle:nil];
    [self.view addSubview:canvasViewController.view];
That Xib file has the view set to a custom class that I made, CanvasView. Right now it just draws a blue diagonal line so that I know it's getting that far.

Here's where I'm stuck since I'm still stuck thinking of this in other languages. How do I get the numbers from the first screen (using [UITextField.text intValue]) to the second one?

I tried making properties in the CanvasViewController class but that's where I got stuck. I need to get those variables to the view. I thought I could just do something like [view filesowner].x1 or something.

I could probably do this a 'triangle' singleton, right?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

OS X is case-sensitive, but they give you the choice of whether you want the filesystem to be or not.

But classic apps aren't compatible with case-senstive filesystems, and lots (most?) of big-name current software isn't either. FileMaker, WoW, Adobe's stuff...

Was the iOS team forced to just pick one file system or something? Why would they pick case-insensitive and cause pain for developers?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Once I had an issue that involved me either formatting my first MBP or an external HD as case-insensitive, then copying over my MP3 collection that was on an NTFS or FAT32 drive to the computer, and I duplicated the majority of the files somehow, so I'd have poo poo like:

Justin Bieber - Boyfriend.mp3
Justin Bieber - Boyfriend.MP3
justin bieber - boyfriend.mp3
Justin Bieber - BoyFriend.mp3

:argh:

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Did the defaults somehow get tweaked so that the window is in a weird space or size? Maybe resize and repoisition the NSWindow on init or something to something you know will work.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Has anyone ever used this, or is it as crazy as it seems?

http://www.andescotia.com/products/marten/

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

What's the closest thing to Turtle Graphics or something on the Mac? Looking for something interactive that I can draw to a window with, preferably in Python or Ruby. Is there a Ruby graphics gem I can use?

I want to be able to do something like:

CreateWindow 500,500

PlotPixel 10, 10
Circle 50, 50, 25
Line 100, 150

etc

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Does Apple pay developers to have their apps ready for new poo poo like tvOS or whatever the latest iDevice is, like the people who demo their apps at Apple events? Or is it more like "you're lucky we're giving you access to this" and it's just part of the biz to have your poo poo up and running on the latest and greatest?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I'm trying to make a program that can identify what UI object the mouse is currently over, similar to this demo from Apple

https://developer.apple.com/library/archive/samplecode/UIElementInspector/Introduction/Intro.html
(AppDelegate.m, the method updateCurrentUIElement is what I was working off of)

However, my program doesn't seem to work. It outputs this:

code:
2018-08-08 23:03:01.881838-0400 MouseTracker[737:12287] Creating system wide accessibility object
2018-08-08 23:03:01.881874-0400 MouseTracker[737:12287] <AXUIElement System Wide 0x600000059770>
2018-08-08 23:03:02.434334-0400 MouseTracker[737:12287] Accessibility Error Code: -25200
2018-08-08 23:03:02.434375-0400 MouseTracker[737:12287] Description: (null)
2018-08-08 23:03:04.386557-0400 MouseTracker[737:12287] Accessibility Error Code: -25200
2018-08-08 23:03:04.386622-0400 MouseTracker[737:12287] Description: (null)
2018-08-08 23:03:04.902849-0400 MouseTracker[737:12287] Accessibility Error Code: -25204
2018-08-08 23:03:04.902935-0400 MouseTracker[737:12287] Description: (null)
2018-08-08 23:03:05.886137-0400 MouseTracker[737:12287] Accessibility Error Code: -25200
The errors are:

kAXErrorFailure = -25200
kAXErrorCannotComplete = -25204

Specifically, this line doesn't appear to be copying the element to the elementUnderCursor variable

code:
        AXUIElementRef elementUnderCursor = NULL;
        // grab what is under the current mouse location
        accessibilityErrorCode = AXUIElementCopyElementAtPosition(_systemWideAccessibilityObject, carbonPoint.x, carbonPoint.y, &elementUnderCursor);
   
It's like I'm missing something basic with how the variables are initialized or copied. Maybe something to do with disabling ARC so UIElementUtilities.h/m would compile (copied from the Apple example)

Here's the whole program:

https://pastebin.com/QrdpAkiR

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Bob Morales posted:

The errors are:

kAXErrorFailure = -25200
kAXErrorCannotComplete = -25204

Specifically, this line doesn't appear to be copying the element to the elementUnderCursor variable



Welp, fixed it. My project was sandboxed by default. Works as expected now.

2018-08-11 19:37:21.647256-0400 MouseTracker[9731:4462376] <AXUIElement 0x600000444fe0> {pid=340}
2018-08-11 19:37:22.646985-0400 MouseTracker[9731:4462376] Accessibility Code: 0
2018-08-11 19:37:22.647085-0400 MouseTracker[9731:4462376] <AXUIElement 0x600000444f80> {pid=332}
2018-08-11 19:37:23.151946-0400 MouseTracker[9731:4462376] Accessibility Code: 0

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I got my 'Poverty Hyperdock' proof of concept working...basically just wanted previews of what windows each app had open (Like Windows Aero Peek)



Need to add:
Showing more than 1 window if that's what the app has open
Click a window's preview to bring it to the front

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

What are the requirements for being able to view the JavaScript console on a connected iDevice?

I tried an iPhone 6S and 8+ (Both lates iOS), two cables, everything works on my Mojave 15” but neither work on my 2009 Mini running El Cap. The device shows in the safari develop menu but goes away befor you can use it.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I spent some time trying to figure out some of my old code, and I found two versions of a project, one is a bit newer. I'm guessing converting CGImageRef to NSImage is less efficient but if it's the better way to do it for some reason, I'm all ears.

Which is the more efficient way of drawing an image? They're rendering pop-up thumbnails of a sort.

code:
	[[previewThumbnails objectAtIndex:i] getValue:&thumbRetrieve];
        NSImage *thumb = [[NSImage new] initWithCGImage:thumbRetrieve size:NSZeroSize];
        [thumb setSize:NSMakeSize(previewWidth, previewHeight)];
        [thumb drawAtPoint:NSMakePoint(x, 100.0+previewBorder)
                      fromRect:NSZeroRect
                     operation:NSCompositingOperationCopy
                      fraction:1.0];
vs:

code:
    
    NSRect bounds = [self bounds];
    CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
    CGRect renderRect = CGRectMake(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
    CGContextDrawImage(ctx, renderRect, backgroundImage);
    CGImageRelease(backgroundImage);

Adbot
ADBOT LOVES YOU

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I created this mapview deal, and then I want to do a thumbnail view up above. Do I have the mapview update the controller (that handles the zoom slider) and then have the controller relay that back to the thumbnail view? (coordinates of current view, size of the mapview, and the current zoom factor so it can generate a colored box the size of the current 'view')

It's not really a thumbnail but an indicator of where the current view is on the grand scheme of however large the map coordinates could be. But anyway.

That just seems...kind of goofy. Maybe I should just have the mapview draw the thumbnail opaquely in the corner of itself. It'd be simpler.

But then what am I going to do when I allow the user to select walls/things, and need to show the texture and other info related to that object? Would I have a property of the mapview with the ID of the currently selected object, and then just highlight that in another window that has all the textures? Something like [[self superview] updateToolsWindow]?

I do like one Cocoa project every 3 years and can never remember the best ways to link up different views.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply