Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-10 Thread brodhage
May be I am wrong (or it is off-topic) - but is this (just) a Sparkle problem?

I have read "Vulnerable Security - There's a lot of vulnerable OS X 
applications out there" (https://vulnsec.com/2016/osx-apps-vulnerabilities/) - 
and if I got the idea then browsing the web is insecure.

Why? Because any application accessing web content via the WebView framework 
(Sparkle, Safari and many other apps) might allow to "launch special / default 
behaviour" (for example "file://" or "ftp://"; or Safari which starts iTunes if 
you click a link to any app store resources) and access to "unknows domains" 
("other domains" or even worse included OS routines). Correct?

In my opinion, the solution (for the Sparkle problem and browsing the internet) 
would be to change the WebView framework itself:
1.) If a domain is accessed, then do not allow access to ANY other domain.
2.) If a web content (or included resources) tries to access "unusual" 
resources (like "file://" or "ftp://"; or "http://192.0..."; or whatever) then 
ask the user for confirmation.

This might not only fix the Sparkle problem, but would give us much more 
security. HTTP or HTTPS.
And it might stop all these (external) traffic analytics and ads we all do not 
want to join or see.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread brodhage

Even if I would agree that the discussion is at the wrong list... :-))

I also dislike XCode 4 - but I do not see the problem.
I am using XCode 3 to develop my stuff - and XCode 4 to e.g. transfer  
it to the App Store.


Just install XCode 4 at a unique developer folder (e.g.  
"developer4"). Then install XCode 3 also at a unique developer folder  
(e.g. "developer3").

This way you can use both.

The only problem I see is the NIB files which are not compatible with  
XCode 3 if created/modified by XCode 4.
If working with XCode 4 I create/modify the NIBs therefor with the  
InterfaceBuilder of XCode 3.


By the way: XCode seems to remove all older versions of the iOS kits  
if installing a newer XCode. It took me hours to download/install  
different versions of XCode, copy the iOS kit (e.g. iOS 3.2, iOS 4.1)  
to a different folder, installing the next version - and at the end  
putting all together.
(As far as I know I need the older iOS kits to build & test iOS apps  
with the Simulator and then to build and send to people with older  
devices.)

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS: Manually setting orientation makes a mess out of my interface

2011-06-07 Thread brodhage

It might be the wrong way to set the orientation manually?

Try to use "shouldAutorotateToInterfaceOrientation" and return "NO"  
for "interfaceOrientation" not being  
"UIInterfaceOrientationLandscapeLeft" or  
"UIInterfaceOrientationLandscapeRight".


This way you have less code and it does not depend on any display size.

It is working in my apps.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


boundingRectWithSize and the size height parameter

2009-08-14 Thread brodhage

Hello,

it seems that the size height parameter of the function  
boundingRectWithSize does not work?


Apple states that the size parameter can be zero or the size of the  
rectangle to draw in.


If the defaultLineHeightForFont is 30 and I set the size height to a  
value (e.g. 100) I would e.g. expect something like 90. But I get  
something like 120 for a text which needs 4 lines.


I tested it under MacOS X 10.4 and 10.5.

Any ideas?

mDescription is a long text (up to 20 lines) but I need to draw e.g.  
only 3 lines (or 4 lines - this depends on the space left on screen)


-- First example ---

NSFont *mDescrFont = [[NSFontManager sharedFontManager]  
fontWithFamily:@"Arial Narrow" traits:0 weight:5 size:descrFontSize];
NSDictionary *mDescrFontAttributes = [[NSDictionary alloc]  
initWithObjectsAndKeys:

.
mDescrFont, NSFontAttributeName,
nil];

NSAttributedString *entry = [[[NSAttributedString alloc]  
initWithString:mDescription attributes:mDescrFontAttributes]  
autorelease];
NSStringDrawingOptions options =  
NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingOneShot |  
NSStringDrawingDisableScreenFontSubstitution;
NSSize s = [entry boundingRectWithSize:NSMakeSize(500, 100)  
options:options].size;


s is always the size the text needs - not the size height which fits  
into it.


-- Second example ---

NSTextStorage *textStorage = [[[NSTextStorage alloc]  
initWithString:mDescription] autorelease];
NSTextContainer *textContainer = [[[NSTextContainer alloc]  
initWithContainerSize:NSMakeSize(width, top - 5)] autorelease];
NSLayoutManager *layoutManager = [[[NSLayoutManager alloc] init]  
autorelease];

[layoutManager addTextContainer:textContainer];
[textStorage addLayoutManager:layoutManager];
[textStorage addAttributes:mDescrFontAttributes range:NSMakeRange(0,  
[textStorage length])];

[textContainer setLineFragmentPadding:0.0];
[layoutManager glyphRangeForTextContainer:textContainer];
NSSize s = [layoutManager usedRectForTextContainer:textContainer].size;

Here s is also not what I would expect.

Cheers
M. Brodhage

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Modal dialog without NSApplication

2008-09-19 Thread brodhage

Hi,

thank you very much for your answer, Rob.

> I am successfully using modal Cocoa windows in a plugin inside a  
Carbon application.


This statement and your code gave me the final hint that it must work  
- and that the problem must be found somewhere else.


Using your code nothing changed at all. In fact it would surprise me  
if using a loop with a session would be different to calling  
runModalWithWindow (concerning my problem I mean).


So I again looked at the documentation - and here we are: do not send  
makeKeyAndOrderFront: to aWindow.

But I called makeKeyAndOrderFront and you too.

I removed the makeKeyAndOrderFront call in my old code - and  
everything works correct.


Everthing?
No - there is still one minor problem: if I hide the carbon  
application and activate it again then my modal window is updated.  
But not the current modal dialog of the carbon application (which  
calls my modal dialog via user action).


Yes - I know. It is not good practice to show two modal dialogs. But  
this is the way the carbon application is doing it. And I can not  
change this.


Any ideas how I can "send" a update to the carbon application?
The problem here is that the NSApplication will receive the event -  
and will not update the carbon modal dialog.


Cheers
Martin Brodhage
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Modal dialog without NSApplication

2008-09-18 Thread brodhage

Hi,

thank you very much again for your quick answer, Jean-Daniel.

> In theorie, you can safely call NSApplicationLoad()

I allready do.

> ... create you own auto release pool

I allready do. And then I call this function (within subclass of  
NSWindowController):


- (void)showModalDialog
{
NSApplication *_app;
NSWindow *_window;

[self showWindow:nil];
_app = [NSApplication sharedApplication];
_window = [self window];
[_app runModalForWindow:_window];
}

The modal dialog (displayed this way) blocks everything - it is not  
possible to close the modal dialog, hit any button or something else.


For me it seems that the NSApplication:: runModalForWindow blocks all.
So what I am searching for is to display the modal dialog without  
NSApplication.


Any ideas?

Cheers
Ness
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Modal dialog without NSApplication

2008-09-18 Thread brodhage

Hi,

thank you very much for your quick answer, Jean-Daniel.

> If you want a complexe dialog...

Yes. So I guess CFUserNotification does not help.

> I don't understand why using NSApp for this kind of works will  
have an impact on the remaining of you application though.


Just because a lot of my code handles common task - and it is not  
guaranteed that there is a NSApplication at all.
For example let's take a plugin for a carbon application - here there  
is no NSApplication.


And: using NSApplication would mean to bind the code only to  
applications and to name all files ".mm" instead of ".cpp" - not  
usable if you want to build that under Win.


Cheers
Martin Brodhage
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Modal dialog without NSApplication

2008-09-18 Thread brodhage

Hi,

I am developing application software for Mac and Windows.
Most of the code is developed using ObjectC - this way most of the  
code can be used for both OS. Only the OS depending stuff - like  
showing dialogs, menus... - is separated.


The problem: how can I show and handle a modal dialog for MacOS X  
without NSApplication?


Using NSApplication (and all the other classes) would mean to have a  
lot more code OS depending.


Any ideas?

Cheers
Martin Brodhage

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


NSApplication in Carbon application

2008-09-10 Thread brodhage

Hello,

first of all I do not know if it is correct to send this message to you.
I allready posted my question to discussions.apple.com but it seems  
that nobody knows an answer.


By the way: after posting the message to discussions.apple.com some  
characters were removed (brackets and some more characters). I do not  
know why and how to correct this (so these characters are not removed  
the next time I post a message).

Any hint would be very nice.



I am writing a plugin for FileMaker (which seems to be a Carbon  
application). The plugin is based on Cocoa.
I want to display a modal dialog. So I am using this code for a  
subclass of NSWindowController:


- (void)showModalDialog
{
NSApplication *_app;
NSWindow *_window;

[self showWindow:nil];
_app = [NSApplication sharedApplication];
_window = [self window];
[_app runModalForWindow:_window];
}

The modal dialog (displayed this way) blocks everything - it is not  
possible to close the modal dialog, hit any button or something else.
Even worse - if I deactivate FileMaker and activate it again then my  
preference dialog is behind the FileMaker preference dialog.


I even tried to call NSApplicationLoad...

My question: how can I get a sharedApplication in Cocoa if the  
Application itself is based on Carbon?
Is this possible at all (or do I have to write my plugin based on  
Carbon)?


Cheers
Martin Brodhage

P.S. My alias in discussions.apple.com is mbrodhage - same as for  
developer.apple.com.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]