"Does not make sense to draw an image" - Warning after upgrade to MountainLion - warnings

After I upgraded my programming machine to MountainLion and XCode to the new version I get this warning printed into the console everytime I run my application:
It does not make sense to draw an image when [NSGraphicsContext
currentContext] is nil. This is a programming error. Break on void
_NSWarnForDrawingImageWithNoCurrentContext() to debug. This will be logged only once. This may break in the future.
I'm not using an Image anywhere in my Application and I searched the whole project for an image but couldn't find one. Does anybody know what could cause this?
I'm using 2 nib files btw: One Popover and the Mainwindow. Neither of them contains an image.
Edit:
I found the line when this appears:
[self.popover showRelativeToRect:[appDelegate.menulet frame]
ofView:appDelegate.menulet
preferredEdge:NSMinYEdge];
But none of those object is nil. Any suggestions?
Edit 2:
The Menulet is a NSView subclass btw. So I'm passing a view.

I tried setting the breakpoint but it is called when the nib loads. So it is very non-specific. I created a copy of the nib and then deleted objects from it one by one until the warning went away. In my case, it was an NSOutlineView. But as as soon as I added a new NSOutlineView, the error came back.
I was finally able to remove the warning by rebuilding the entire NIB by hand. Painstaking but it got rid of the warning.

If you have a NSImageView that's initialized in the nib but with no image set (and you draw the image yourself in code) just set it and the warning will be gone.

In my case, it's because the image size is {0,0}, which "doesn't make sense".
Actually, the image is for a NSButton, I change the button's image programmatically. In one case, the button should be empty, so I just set an empty image with [NSImage new].
But the error occurs, then no matter how I change the button's image, the button is always empty.
After setting a size to the empty image, the problem is solved, and I can change the button's image successfully.

In my case the warning resulted in rewriting my menuIcon with a rectangle (Working on a menuBar application). Haven't solved the problem yet, but I know where it came from in my case. If you have a menubar application, check the code which generates your icon.

Related

MS Access: Attachment type symbol shows black backround

I have a small database project where users can attach files to records. Mostly pdf and word docs. I am using the attachment type fields that access provides because I want to get more familiar with them. I have a continuous form that shows the attachment field using the Picture/Symbol view option. Most of the time, but strangely not always, the attachment symbol shows this black background behind its symbol. The black background does not cover the whole field but rather only the picture for the attachment type (Word, PDF etc.). The field itself is set to transparent, which is neccesary for my row highlighting to work. Does anyone know why this is happening? Is it a bug? Some way to fix it? It had worked when I had first set it up but upon restarting my computer and reopening the project they turned black and are now stuck that way. I removed them later for some reason and re-did the whole thing, upon which it seemingly worked but after restarting it went black again. There is no difference between using the view settings Picture/Symbol and Symbol.
Visual Aid:
Update 1:
The black backgrounds are seemingly random. I set the view option to Paperclip, restarted access, then set them to Picture/Symbol again and now I get this:
Closing and opening the file appears to turn the backgrounds black. Changing the view type back and forth inbetween can fix some, but not always.... I'm really not sure what's going on.
Update 2:
The issue is seemingly not affected by transparancy settings. Changing the Background color of the field has no impact either. The issue also persists when making a new form from scratch and adding the Attachment type field to it. It also carries over from one pc to another, so unless both have the same issue in their windows installation I don't think that is the root cause either. Compress & Repair did not help. I am only using one attached file per record.
Update 3:
I have had no luck consistently reproducing the issue. Most of the time, about 80% of it I am estimating, the issue persists. Some days, when launching access, the issue is resolved partially for either the word icon, or the pdf icon. On some days the issue is resolved for all icons as in the picture below. Almost always, after closing and opening access, the issue will immediately reappear for all icons. Closing and opening the form only and keeping the file open is fine, the issue stays resolved. Really not sure how to go about this.
My Access version:
Version 2205 Build 16.0.15225.20028
My Windows install:
Microsoft Windows 10 Pro
10.0.19044 Build 19044
So, updated to windows 11 and the issue is solved. No idea what was wrong exactly but it turns out it was related to the windows install. So, some kind of a bug in Win 10 is my guess, since it was happening on two different machines both running win 10.

razor blade with final cut pro X, duplicate instead of cut my plan

when I used the razor blade, it multiply my plan by two instead of making a cut where I need on the plan ?
Something about the settings ?
Someone has an idea ?
thank you
No matter what version of application you are using FCP7 or FCPX, the reason for such unpredictable behaviour of the app is a bug. Seemingly it's internal error of mp4 structure, unless you accidentally move a content inside a clip with a Slip Tool.
Or you have accidentally applied Cmd-V (Paste) command instead Cmd-B (Blade Tool) on your keyboard.
Or you've made a copy of a clip pressing Alt+LMB while dragging.

pending add image asp.net mvc 5 visual studio

I get a "Pending add" message when I hover over the "+" sign in front of an image (whether in .png, .gif, or .jpg format) that I've just added to a project. Even though Visual Studio shows a thumbnail of the image when I hover over its name in the Solution Explorer, it is not showing up as the background of the body of my page. (When I alternately assign a background color in that same body section, that color DOES show up.) Don't know why it would matter, but I added this image by right-clicking my new Images folder and adding an existing item.
I've already gone through answers involving Pending changes, and none of those are helpful here. Any suggestions for getting this image to stop "Pending add" and be added already, so that it will render, please? Thank you.
Commit your changes, that's all.
In other words, the icons on the left are the status of source control. So, it is saying that this is a new item that you added into the project. So, you now need to add it to the source control.
When you do your commit, it will detect the new file and you will have option of adding it at that time.
If the image was excluded you would have to include it to be shown. As you figured out, this doesn't mean it's not included in project.
The "Pending add" info indicates that it's not yet "Checked in" (when sharing a project).
If someone gets confused with this, it's probably the usage of wrong path or something else.
I had this problem. I deleted the image files from Solution Explorer and re-added them, and the images were immediately checked in.

Is there a maximum number of clicktag variables allowed in a banner ad?

So, this is pretty silly. I'm working on a banner ad that utilizes the clicktag. It's a surprisingly fancy one that uses pointroll, and when you hover over the 300x250 banner ad, it pulls up a larger one overtop of it that is bigger and much more interactive. In total, the larger banner has 29 clicktags, all using the variables "clickTag1" to "clickTag29".
The banners are all done, everything fires correctly (according to my trace statements). However, I'm in the middle of QA, testing all of the clicktags using this validator: https://flashval-temp.appspot.com/validator/ , when suddenly, it stops working after clickTag20. I thought it may have been the validator at first, so I tried other validators. No luck. I went back into my code (everything is a duplicate of one template, so the only code changes made were the changes to the string), and made sure to test it again. They're firing off just fine according to my trace statements.
Finally, and this doesn't seem to make sense to me, but I switched the variables clickTag20 and clickTag21. The button that fired off clickTag20 worked, so I assigned it clickTag21. The button that was assigned clickTag21 was the first to stop working, so I assigned it clickTag20. When I ran that through the validator, the button that was assigned to clickTag20, regardless of which button it was, worked! The one that was assigned clickTag21 never did, also regardless of which button it was fired off from.
The variable is a string of a paramObj. How does the content of that string matter? I would have assumed it was compile order, but even in that case, clickTag21 should have fired and not clickTag20. What is going on here? Has anyone else experienced this? If so, did you have a workaround? Please and thank you!!
Here is the thing... when you set a clicktag you're waiting for a flashvar. A parameter sent from the HTML to your SWF file. (more: http://helpx.adobe.com/flash/kb/pass-variables-swfs-flashvars.html)
Usually you'd test, if this parameter doesn't exists, the banner should do nothing, otherwise, open the link.
Turns out, and this is a guess, that these validators don't know how many clicktags you have in your flash file - or how many parameters you're waiting for - , so they pass up to 20 variables to your flash file, which is more than reasonable.
The bottom line is: if your events are working, you should be fine. Pointroll has a QA team, if something comes up, they will let you know, but as far as I can see from here, you should be fine.
Good luck

How to disable/hide an error in Flash Builder 4

When writing code sometimes those red error icons pop up on the left side. Most of the time they are on point, but sometimes they are wrong. How can I hide them. They annoy me too much.
The red ones are proper errors, I am concerned about that they should actually be "wrong". The yellow (or orange) ones are warnings which can be hidden by using proper AS3 syntax.
Rob
By default when you save your code in process of editing Flash Builder performs rebuilding of your project and if you have some errors in file (unfinished lines for example) it shows them as red markers.
If you want to control build process manually you can go to the Project menu and deselect Build Automatically. Now you can invoke build process manually to show error markers when you want. Just go to the same Project menu and select Build project. You can even assign keyboard shortcut for this operation.
Hope this helps!